package com.lanou3g.k12.utils;

public class GetImgUrlUtils {

    public static String getUrl(String content){
        try {

        String img = (content.substring(content.indexOf("<img src"),content.indexOf(">",content.indexOf("<img src"))+1));
        String cover = (img.substring(img.indexOf("http"),img.indexOf("\"",img.indexOf("http"))));

            if (img != null && cover != null){
                return cover;
            }else {
                return null;
            }
        }catch (Exception e){
            e.printStackTrace();
            return null;
        }


    }
}
